package com.tanfuqi.sicent.server.controller

import com.tanfuqi.sicent.protocol.message.Message
import com.tanfuqi.sicent.server.filter.sent
import org.springframework.web.bind.annotation.GetMapping
import org.springframework.web.bind.annotation.PathVariable
import org.springframework.web.bind.annotation.RestController

@RestController
class ComputerController : BaseController() {
    @GetMapping(value = ["/shop/{shopId}/computer/{computer}"])
    fun computer(@PathVariable shopId: String, @PathVariable computer: String) =
            session(shopId).sent(Message(0x9001, body = mapOf("computer" to computer))).map { it.body }


}